package com.foodchain.repository;

import com.foodchain.entity.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

@Repository
public interface BaseUserRepository extends JpaRepository<User, String> {
    @Query(value = "from User where userName=?1")
    User findByUserName(String userName);
    @Query(value = "select integral from User  where id=?1")
    Integer getByUserId(String userId);
}
